<?php

if ($handle = opendir('../data')) {

    while (false !== ($file = readdir($handle))) {
		$lines = file("../data/".$file);
		foreach($lines as $line) {
			if (strpos($line,"ffxivcalc") == False) {
				$outputString .= $line;
			}
		}
    }
    closedir($handle);

}

echo  "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<allSkills>\n".$outputString."</allSkills>\n";

/*$myFile = "all.xml";
	$fh = fopen($myFile, 'w');
	
	
	fwrite($fh, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<allSkills>\n".$outputString."</allSkills>\n");
	fclose($fh);*/
?>